package com.yfp.job.task;

import com.yfp.common.core.domain.R;
import com.yfp.operation.api.RemoteOperationService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


/**
 * 定时任务调度测试
 *
 * @author ruoyi
 */
@Slf4j
@Component("couponAndActivityTask")
public class CouponAndActivityTask {

    @Resource
    private RemoteOperationService remoteOperationService;

    public void marCall() {
        log.info("定时任务开始执行：调用pg存储过程，更新表状态");
        R<Void> voidR = remoteOperationService.marCall();
    }

    public void checkCouponPackAndUpdateAllStatus() {
        log.info("定时任务开始执行：检测并更新所有优惠券礼包状态，更新表状态");
        R<Void> voidR = remoteOperationService.checkCouponPackAndUpdateAllStatus();
    }

    public void checkActivitySignInsAndUpdateAllStatus() {
        log.info("定时任务开始执行：检测并更新所有打卡活动状态");
        R<Void> voidR = remoteOperationService.checkActivitySignInsAndUpdateAllStatus();
    }

    public void checkLotteryAndUpdateAllStatus() {
        log.info("定时任务开始执行：检测并更新所有抽奖活动状态");
        R<Void> voidR = remoteOperationService.checkLotteryAndUpdateAllStatus();
    }

    public void newClientPositionLabel() {
        log.info("定时任务开始执行：给进社群的新客户打点位标签");
        R<Void> voidR = remoteOperationService.newClientPositionLabel();
    }
}
